
import "./nav.css"
export function Nav(props) {
    let { navItems, random, navigation } = props
    return (
        <>
            <header>
                <div className="logo">
                    <img loading="lazy" src={`https://robohash.org/ ${random()}`} alt="" />

                </div>
                <div className="nav_list">
                    <ul >
                        {
                            navItems.map((item, index) => {
                                return <li key={index} onClick={() => navigation(item.to)}>{item.name}</li>
                            })
                        }
                    </ul>
                </div>
            </header>
        </>
    )

}